package objects;

public class Ship {
// ************************ Class Variables *******************
	
	private String ship_name;
	private int ship_hull;
	private int ship_weapons;
	
	
	private int current_ship_hull;
	private int current_ship_weapons;
	private int current_ship_initiative;
	
	
	
	
	
	// ******************* CONSTRUCTORS **********************
	public Ship(String name, int hull, int weapons){
		ship_name = name;
		ship_hull = hull;
		ship_weapons = weapons;
		
		current_ship_hull = ship_hull;
		current_ship_weapons = ship_weapons;
		current_ship_initiative=0;
	}//testing constructor end
	
	
	// ********************* SET METHODS *********************
	
	public void setHull(int set){
		ship_hull = set;
	}//end setShipHull
	
	public void setName(String s){
		ship_name = s;
	}//end setShipName
	
	public void setCurrentHull(int h){
		current_ship_hull = h;
	}//end setCurrentShipHull
	
	public void setCurrentInitiative(int i){
		current_ship_initiative = i;
	}//end setCurrentInitiative
	
	
	// ********************* GET METHODS *********************
	
	public int getHull(){
		return ship_hull;
	}//end getShipHull
	
	public String getName(){
		return ship_name;
	}//end GetShipName
	
	
	
	public int getCurrentHull(){
		return current_ship_hull;
	}//end getCurrentHull
	
	public int getCurrentWeapons(){
		return current_ship_weapons;
	}//end getCurrentShipWeapons
	
	public int getCurrentInitiative(){
		return current_ship_initiative;
	}//end getCurrentInitiative


	// ************************** OVERRIDES ****************************
	//These are generated by Eclipse
	
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ship_hull;
		result = prime * result
				+ ((ship_name == null) ? 0 : ship_name.hashCode());
		result = prime * result + ship_weapons;
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Ship other = (Ship) obj;
		if (ship_hull != other.ship_hull)
			return false;
		if (ship_name == null) {
			if (other.ship_name != null)
				return false;
		} else if (!ship_name.equals(other.ship_name))
			return false;
		if (ship_weapons != other.ship_weapons)
			return false;
		return true;
	}
	
	
	
	
	
	
	
}//end of class



